<%@include file="/page/tag.jsp"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=9" ></meta>
<title>更改密码</title>

<link href="${ctp}/QUI/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
<link href="${ctp}/QUI/libs/skins/lightBlue/style.css" rel="stylesheet" type="text/css" id="theme" themeColor="lightBlue"/>
<link href="${ctp}/QUI/main_skin/style.css" rel="stylesheet" type="text/css" id="skin" skinPath="QUI/main_skin/"/>
<script type="text/javascript" src="${ctp}/QUI/libs/js/jquery.js"></script>
<script type="text/javascript" src="${ctp}/QUI/libs/js/language/cn.js"></script>
<script type="text/javascript" src="${ctp}/QUI/libs/js/main.js"></script>


</head>
<!--引入组件start-->
<script src="${ctp}/QUI/libs/js/form/validationRule.js" type="text/javascript"></script>
<script src="${ctp}/QUI/libs/js/form/validation.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
        $(document).ready(function(){
        $("#form1").validationEngine(
                );
    })

		function tijiao(){
         	var para=$('input').serialize();
			var access=false;
			access=$('#form1').validationEngine({returnIsValid:true})
			if(access){
		      $.ajax({
			       type:"post",
				       url:"${ctp}/login/change_pwd.do",
				       data:para,
				       success:function(result){
							if(result.result){
								top.Dialog.alert(result.msg, function(){
									top.Dialog.close();
								});
								}
						else{
							top.Dialog.alert(result.msg);
						}
			       },
			       error:function(){
			       }
		      });
			}
		}

</script>
<body>
<div class="box1" panelWidth="100%">
    <form  name="form1" id="form1" onsubmit="return false;">

	<table class="tableStyle" formMode="true">
		<tr>
			<th colspan="2">提示：密码建议使用数字和字母组合！</th>
		</tr>
		<tr>
			<td width="30%">帐号：</td><td width="70%">
            <input type="text" name="username" value="" class="validate[required,custom[noSpecialCaracters]]"/><span class="star">*</span>
        </td>
		</tr>
		<tr>
			<td  >旧密码：</td>
			<td><input type="password" name="password" id="oldpwd" class="validate[required]"/><span class="star">*</span></td>
		</tr>
		<tr>
			<td>新密码：</td>
			<td><input name="newPassWord" id="newpwd" type="password" checkStrength="true" class="validate[required,length[6,20]]"/><span class="star">*</span>密码长度须大于等于6位</td>
		</tr>
		<tr>
			<td>确认密码：</td>
			<td><input name="confnewpwd" id="confnewpwd" type="password"  class="validate[required,confirm[newpwd]]"/><span class="star">*</span>密码长度须大于等于6位
            </td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<input type="submit" value=" 提 交 " onclick="tijiao()"/>
				<input type="reset" value=" 重 置 "/>
			</td>
		</tr>
	</table>
        </form>
	</div>

</body>
</html>